package com.bc.bccore.webconfig;

import com.bc.commoncore.util.ParseHelper;
import com.bc.commoncore.util.PropertyUtils;

/**
 * @Name WebConfig
 * @Description
 * @Author douhaichao
 * @Date 2018/6/28 15:55
 * @Version 1.0
 **/
public class WebConfig {

    /**
     * 是否尝试发送邮件
     */
    private static String trySendEmailUrl;

    public static String getTrySendEmailUrl() {
        return PropertyUtils.getProperty("trySendEmailUrl");
    }

    //    // 默认分页条数
    private static int defaultPageSize;

    public static int getDefaultPageSize() {
        int defaultPageSize = ParseHelper.ToInt(PropertyUtils.getProperty("defaultPageSize"), 20);
        if (defaultPageSize <= 0) {
            return 20;
        }
        return defaultPageSize;
    }

    /* ===========以上配置为每个项目必须的配置项，不能改动==================== */

    /* ===========以下配置为具体的业务配置项==================== */
    // 静态文件域名
    private static String staticSitePath;
    // 站点域名
    private static String sitePath;
    // 静态资源版本号
    private static String staticVersion;
    // 综合权限系统资源
    private static String accountStaticPath;
    //图片服务器资源
    private static String imgUrl;

    public static String getImgUrl() {
        return PropertyUtils.getProperty("imgUrl");
    }

    public static String getAccountStaticPath() {
        return PropertyUtils.getProperty("accountStaticPath");
    }

    public static String getSitePath() {
        return PropertyUtils.getProperty("sitePath");
    }

    public static String getStaticSitePath() {
        return PropertyUtils.getProperty("staticSitePath");
    }

    public static String getStaticVersion() {
        return PropertyUtils.getProperty("staticVersion");
    }

    /**
     * 是否为测试
     */
    private static int isDebug;

    public static int getIsDebug() {
        return ParseHelper.ToInt(PropertyUtils.getProperty("isDebug"), 0);
    }

    /**
     * 上传附件地址
     */
    private static String uploadUrl;

    public static String getUploadUrl() {
        return PropertyUtils.getProperty("uploadUrl");
    }

    /**
     * 钱包服务地址
     */
    private static String gethUrl;

    public static String getGethUrl() {
        return PropertyUtils.getProperty("gethUrl");
    }

    /**
     * 冷包地址
     */
    private static String coldWallet;

    public static String getColdWallet() {
        return PropertyUtils.getProperty("coldWallet");
    }

    private static String coldWalletPK;

    public static String getColdWalletPK() {
        return PropertyUtils.getProperty("coldWalletPK");
    }

    private static String coldWalletPKSalt;

    public static String getColdWalletPKSalt() {
        return PropertyUtils.getProperty("coldWalletPKSalt");
    }

    /**
     * EOS钱包接口
     */
    private static String eosUrl;

    public static String getEosUrl() {
        return PropertyUtils.getProperty("eosUrl");
    }

    /**
     * EOS钱包接口
     */
    private static String projectType;

    public static String getProjectType() {
        return PropertyUtils.getProperty("projectType");
    }
}
